type CChar = (Char->Char)->Char->Char;
var ZERO: CChar;
ZERO = $f:(Char->Char)=>$x:Char=>x;
var SUCC: CChar->CChar;
SUCC = $m:CChar=>$f:Char->Char=>$x:Char=>f(m(f)(x));
var ONE = SUCC(ZERO);
var TWO = SUCC(ONE);
var THREE = SUCC(TWO);
var FOUR = SUCC(THREE);
var FIVE = SUCC(FOUR);
var SIX = SUCC(FIVE);
var SEVEN = SUCC(SIX);
var MUL = $m:CChar=>$n:CChar=>$f:Char->Char=>$x:Char=>m(n(f))(x);
var ADD = $m:CChar=>$n:CChar=>$f:Char->Char=>$x:Char=>m(f)(n(f)(x));
var INC = $x:Char => x + '\1';
var Char_H = SEVEN;
var Char_A = ZERO;
var Char_P = MUL(FIVE)(THREE);
var Char_Y = MUL(FOUR)(SIX);
var Char_N = ADD(SIX)(SEVEN);
var Char_E = FOUR;
var Char_W = ADD(MUL(FOUR)(FIVE))(TWO);
var Char_R = ADD(MUL(FIVE)(TWO))(SEVEN);
var TO_CHAR = $f:CChar => f(INC)('A');
var TO_SPACE = (ZERO)(INC)(' ');
print(TO_CHAR(Char_H));
print(TO_CHAR(Char_A));
print(TO_CHAR(Char_P));
print(TO_CHAR(Char_P));
print(TO_CHAR(Char_Y));
print(TO_SPACE);
print(TO_CHAR(Char_N));
print(TO_CHAR(Char_E));
print(TO_CHAR(Char_W));
print(TO_SPACE);
print(TO_CHAR(Char_Y));
print(TO_CHAR(Char_E));
print(TO_CHAR(Char_A));
println(TO_CHAR(Char_R));
